package test.kdonghwa;

import org.springframework.jms.core.JmsTemplate;

/**
 * Created with IntelliJ IDEA.
 * User: kdonghwa
 * Date: 12. 4. 13.
 * Time: 오후 5:01
 * To change this template use File | Settings | File Templates.
 */
public class MsgProducerImpl implements  MsgProducer {
    private JmsTemplate jmsTemplate;

    @Override
    public void send(final Msg msg) {
        System.out.println("======> " + msg);
        jmsTemplate.convertAndSend(msg);
    }

    @Override
    public void setJmsTemplate(JmsTemplate jmsTemplate) {
        this.jmsTemplate = jmsTemplate;
    }

    @Override
    public JmsTemplate getJmsTemplate() {
        return jmsTemplate;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
